﻿<?xml version="1.0" encoding="utf-8" ?>
<!-- ScriptConfig\Earth.xml -->
<configuration>
  <configSections>
    <section name="body" type="ScriptConfig.Config.Body, ScriptConfig, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowLocation="true" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" overrideModeDefault="Allow" restartOnExternalChanges="true" requirePermission="true"/>
  </configSections>

  <body>
    <!--
      Nature defines the behaviour of each of the cells in the tile. It
      decides what each cell looks like and behaves like according to the
      cell's elevation, orientation, environment and anything else that
      looks appropriate.
      
      All cells pass through these tests until the nature for that cell has
      been confirmed
    -->
    <!--<nature>-->
      <!--<cell minHeight="1" maxHeight="1700" minNormalZ="0.7" maxNormalZ="1.0">-->
        <!-- These cells are capable of of being forests -->
      <!--</cell>-->
    <!--</nature>-->
    
    <!--
      The definition of all of the production "factories" in the game
    -->
    <producerDefinitions>
      <producerDefinition name="forest">
        <xy x="0.0" y="0.0" />  <!-- it doesn't require any extra space -->
        <inputs>
          <!--
            waste "disappears" over time at a rate that varies according to
            research and other factors
          -->
          <product name="waste" rate="100.0" />
        </inputs>
        <outputs>
          <product name="tree" rate="0.5" />
        </outputs>
      </producerDefinition>

      <!--
        Houses produce workers
      -->
      <producerDefinition name="house">
        <xy x="10.0" y="22.0" />
        <outputs>
          <product name="worker" rate="0.04" />
          <!-- recycling anyone? :) -->
          <product name="waste" rate="0.1" />
        </outputs>
      </producerDefinition>
      
      <!--
        Sawmills produce wood
      -->
      <producerDefinition name="sawmill">
        <xy x="80.0" y="140.0" />
        <inputs>
          <product name="tree" rate="10" />
        </inputs>
        <outputs>
          <!-- research will change these rates -->
          <product name="wood" rate="100" />
          <product name="waste" rate="10.0" />
        </outputs>
      </producerDefinition>
    </producerDefinitions>
    
    <!--
      The definition of each of the materials in the game
    -->
    <materialDefinitions>
      <!--
        Trees are produced by "forest" cells and serve as raw materials for
        houses and sawmills
      -->
      <materialDefinition name="tree">
        <xy x="0.25" y="0.3" />
      </materialDefinition>
      <materialDefinition name="wood">
        <xy x="0.1" y="2.6" />
      </materialDefinition>
    </materialDefinitions>
    
    <!--
      The behaviour of each of the planets that we know about
    -->
    <planets>
      <planet name="Earth" homeAddress="[N.41.32.17, W.122.5.46, 1700]">
      <!--<planet name="Earth" homeAddress="[N.45.8.47.9, W.125.57.22.33, 400]">-->
        
        <!--
          The start actions serve to initialize the planet before the game starts
          and (perhaps) the user loads a saved game
        -->
        <startActions>
          <startAction name="research">
            <arguments>
              <!--
               Enable research into the technologies (not the same as completing the research!)
               Other technologies will be enabled when they become unlocked by meeting requirements
              -->
              <argument name="carpentry" expression="enable" />
              <argument name="metalworking" expression="enable" />

              <!--
                Some technologies we get for free. This will unlock materials and research that depends
                on the completed research: "forest" cells give us trees and "pottery" unlocks research into
                "granaries", for example.
              -->
              <argument name="forest" expression="complete" />
              <argument name="pottery" expression="complete" />
            </arguments>
          </startAction>
        </startActions>
        
      </planet>
    </planets>
  </body>
</configuration>
